import React from "react";
import Style from './index.less'
import MyProfileItem from "@/pages/MyProfileItem";
import {Image} from "antd-mobile";
import {useModel} from "@@/plugin-model/useModel";

const MyProfile: React.FC = ()=> {
  const { initialState } = useModel('@@initialState');
  // @ts-ignore
  const { currentUser } = initialState;

  return(
    <div className={Style.body}>
      <div className={Style.header}>
        <div className={Style.profileHeader}>
          <div className={Style.profileAvatar}>
            <Image
              src={currentUser?.avatar}
              style={{width: 80, height: 80}}
            />
          </div>
          <div>
            <b style={{fontSize: 28}}>{currentUser?.name}</b>
            <p className={Style.profileTitle}>SG极简流水账</p>
          </div>

        </div>
      </div>
      <div className={Style.content}><MyProfileItem/><div style={{height: 60}} /></div>

    </div>
  )
};
export default MyProfile;
